home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Taifun / Taifun 143 (1990-08-15)(Ossowski, Stefan)(DE)(PD).zip / Taifun 143 (1990-08-15)(Ossowski, Stefan)(DE)(PD).adf / Berserker / berserker.s < prev    next >
Text File  |  1990-07-19  |  27KB  |  1,130 lines

  1. * SOS *  only a message for a tool which rips source after guru/reset!
  2. ****************************************************************************
  3. *
  4. *                         B E R S E R K E R  IV.a
  5. *                         -----------------------
  6. *
  7. *                 © Copyright 1988, 1989, 1990 by Ralf Thanner
  8. *
  9. * This code is entirely written in assembler for the Kuma Seka assembler
  10. *
  11. *    Executable program and source code are both in the PUBLIC-DOMAIN!
  12. *
  13. *  A small copy fee for Berserker is okay, but anything which looks like
  14. *        commercial redistribution is forbidden (remember that!).
  15. *
  16. **************************************************************************
  17. *
  18. *    REVISION HISTORY:
  19. *    =================
  20. *
  21. *  R    V1.0    - Just a primitive SCA finder and killer.
  22. *
  23. *  R    V1.c    - Added Byte Bandit & Byte Warrior killer.
  24. *        - Improved SCA & SCA mutants killer routine.
  25. *          -> OBELISK, AEK, LSD, PENTAGON, BAMIGA SECTOR ONE,
  26. *             WARHWAK, MICROMASTER & NORTHSTAR...
  27. *
  28. *  R    V2.b    - Now also finds the Exterminator (LAMER).
  29. *
  30. *  R    V2.d    - Now finds the first link virus (IRQ TEAM 41).
  31. *
  32. *    V2.e    - Added alert box. Idea by Olaf Barthel.
  33. *        - Some cleanups and bug-fixes done.
  34. *
  35. *  R    V2.e+    - Doesn't refuse to work with Kick 1.3 any more.
  36. *        - Added custom bootblock writer.
  37. *        - Added kill cold-cool vectors;
  38. *          There are just too many SCA clones on the market
  39. *          and it is saver to clear these pointers.
  40. *
  41. *  R    V3.0    - Now also finds the BSG 9 link virus.
  42. *        - Second (and final?) code cleanup for public
  43. *          release (YEAH!!!).
  44. *        - Removed the custom bootblock writer, too many guys
  45. *          thought Berserker to be some kind of virus in
  46. *          disguise.
  47. *
  48. *  R    V3.0+    - Extended to find Gaddafi and Disk-Doctor viruses.
  49. *
  50. *    V3.1    - Extended to find the REVENGE BOOTLOADER virus.
  51. *          -> THIS IS A NEW ONE!!!
  52. *        - Bug-fix in EXTERMINATOR routine done.
  53. *          -> should now find ALL lamer versions....
  54. *        - Code cleanup (added some sub-routines).
  55. *
  56. *    V3.2    - Extended to find REVENGE (is an old one, but some
  57. *          nice guys told me, that berserker should also find
  58. *          the old ones....and because BERSERKER crashed when
  59. *          memory was infiltrated by REVENGE )
  60. *
  61. *    V3.2b   - Shortening, speeding up & cleaning the code.
  62. *          ( and berserker still works.... )
  63. *
  64. *  R    V3.39c+ - JOKE....
  65. *
  66. *    V3.5    - Added Xeno 'killer' routine by STEVE TIBBET.
  67. *
  68. *    V4.0    - Added a more userfriendly Cli-Interface and the
  69. *          possibility to start BERSERKER from workbench.
  70. *
  71. *  R    V4.0a    - WHAAA, what a pity: forgot to reply message..
  72. *          Bug now fixed... Thanks to Olaf for this hint.
  73. *        - Shortened and improved code again.
  74. *
  75. *  R = released version
  76. **************************************************************************
  77. *    BECAUSE OF THE LARGE AMOUNT OF TEXTDATA WOULD I SUPPOSE
  78. *    THAT YOU CRUNCH BERSERKER. ( with any hunk packer.. ) 
  79. **************************************************************************
  80. *
  81. *                RALF THANNER
  82. *                   ELLERSTASSE 83
  83. *                 4000 DUESSELDORF 1
  84. *                WEST GERMANY
  85. *
  86. **************************************************************************
  87. *
  88. *   This is the assembly language source code for BERSERKER IV.a
  89. * (Cleaned up on request from Ralf Thanner by Olaf 'Olsen' Barthel)
  90. *
  91. **************************************************************************
  92.  
  93. ;
  94. ;
  95. ;     exec.library
  96. ;
  97.  
  98. forbid=        -132
  99. permit=        -138
  100. freemem=    -210
  101. findname=    -276
  102. findtask=    -294
  103. getmsg=        -372
  104. replymsg=    -378
  105. waitport=    -384
  106. closelib=    -414
  107. openlib=    -552
  108.  
  109. ;
  110. ;    dos.library
  111. ;
  112.  
  113. open=        -30
  114. close=        -36
  115. read=        -42
  116. write=        -48
  117. output=        -60
  118. delay=        -198
  119.  
  120. mode_old=    1005
  121.  
  122. ;
  123. ;    intuition.library
  124. ;
  125.  
  126. dispalert=    -90
  127.  
  128. ;
  129. ;
  130. **********************************************************************
  131.  
  132. powerup:
  133.     movem.l        d0-d7/a0-a6,-(a7)
  134.  
  135.     bset        #1,$bfe001
  136.  
  137.  
  138.     move.l        $04.w,a6
  139.     suba.l        a1,a1
  140.     jsr        findtask(a6)
  141.     move.l        d0,a4
  142.     tst.l        $ac(a4)
  143.     bne.s        cli_call
  144.     lea        $5c(a4),a0
  145.     jsr        waitport(a6)
  146.     lea        $5c(a4),a0
  147.     jsr        getmsg(a6)
  148.     move.l        d0,message
  149.  
  150.     movem.l     (a7)+,d0-d7/a0-a6
  151.     bra.L        workbench
  152.  
  153. * CLI-PARAMETER HANDLER        -> same as in MEGUARD III
  154.  
  155. cli_call:
  156.     movem.l     (a7)+,d0-d7/a0-a6
  157.     subq        #1,d0
  158.     beq.s        no_cli_parameter
  159. which_parameter:
  160.     cmp.b        #$20,(a0)+
  161.     bne.s        parameter_found
  162.     dbra        d0,which_parameter
  163.     bra.s        no_cli_parameter
  164. parameter_found:
  165.     move.b        -(a0),d0    
  166.     cmp.b        #'?',d0
  167.     beq.L        instructions
  168. no_cli_parameter:
  169.  
  170.     move.l        $04.w,a6    ; $04 is ExecBase
  171.     jsr        FORBID(a6)    ; forbid all tasks
  172.  
  173.     bsr.L        open_libs
  174.  
  175.     bsr.L        open_output
  176.  
  177.     bsr.s        kill_viruses
  178.  
  179.     move.w        virusflag,d0
  180.     cmp.w        #0,d0        ; No virus found!!!!
  181.     bne.s        exit4        ; Lucky ones...
  182.     move.l        #mes0,d2
  183.     move.l        #mes0length,d3
  184.      bsr.L        writer
  185.     bra.s        exit3
  186.  
  187. exit4:    bsr.L        alert        ; Virus found
  188.  
  189. exit3:    move.l        $04.w,a6
  190.     jsr         PERMIT(a6)    ; Allow other tasks
  191. exit5:    bsr.L        close_libs
  192.     moveq        #00,d0
  193.     rts
  194.  
  195. exit_workbench:
  196.     bsr.L        close_libs
  197.     move.l        $04.w,a6
  198.     jsr        forbid(a6)
  199.     move.l        message,a1
  200.     jsr        replymsg(a6)
  201.     moveq        #00,d0        ; For clear entry into CLI
  202.     rts                ; Back to CLI...
  203.  
  204. ************************* SUB ROUTINES *********************************
  205.  
  206. kill_viruses:
  207.     bsr.L        Xeno        ; XENO - Link
  208.     bsr.L        revenge        ; REVENGE (old one)    
  209.     bsr.L        revenge_boot    ; REVENGE - BOOTLOADER
  210.     bsr.L        gadaffi        ; Gadaffi
  211.     bsr.L        disk_doctor    ; Disk Doctor
  212.     bsr.L        sca        ; Checks for SCA & mutants
  213.     bsr.L        dasa        ; Checks for Byte Warrior
  214.     bsr.L        irq        ; Link
  215.     bsr.L        bsg        ; Link
  216.     bsr.L        exterminator
  217.     bsr.L        bytebandit
  218.     bsr.L        killcold_cool    ; Always clear the cold and
  219.     rts                ; the cool capture
  220.  
  221. workbench:
  222.     bsr.L        open_libs
  223.     bsr.L        open_con
  224.     bsr.s        work
  225.     bsr.L        close_con
  226.     bra.s        exit_workbench
  227. work:
  228.     bsr.L        write_con_txt
  229.     bsr.L        read_con
  230.     moveq        #0,d0
  231.     move.b        input_buffer,d0
  232.     cmp.b        #'?',d0
  233.     beq.s        work03    ; instructions
  234.     cmp.b        #'q',d0
  235.     beq.s        work04        
  236.     cmp.b        #'Q',d0    ; leave
  237.     beq.s        work04
  238.     cmp.b        #'c',d0
  239.     beq.s        work05    ; kill virus        
  240.     cmp.b        #'C',d0
  241.     beq.s        work05
  242.     bra.s        work
  243.  
  244. work03:
  245.     bsr.L        write_con_ins
  246. mouse:
  247.     move.l        #$0a,d1
  248.     jsr        delay(a5)        
  249.     btst        #10,$dff016
  250.     bne.s        mouse
  251.     clr.w        input_buffer
  252.     bra.s        work
  253.  
  254. work04:    rts
  255.  
  256. work05:
  257.     move.l        $04.w,a6
  258.     jsr        forbid(a6)
  259.     bsr.L        kill_viruses
  260.     move.w        virusflag,d0
  261.     cmp.w        #0,d0
  262.     bne.s        work06
  263.     move.l        #mes7,d2
  264.     move.l        #mes7length,d3
  265.      bsr.L        writer
  266.     move.l        $04.w,a6
  267.     jsr         permit(a6)
  268.     move.l        dosbase,a5
  269. work07:
  270.     move.l        #$0a,d1
  271.     jsr        delay(a5)        
  272.     btst        #10,$dff016    ; right MB
  273.     bne.s        work07
  274.     bra.L        work
  275.  
  276. work06:    bsr.L        alert
  277.     clr.w        virusflag
  278.     move.l        $04.w,a6
  279.     jsr         permit(a6)    ; Allow it all
  280.     bra.L        work
  281.  
  282. open_libs:
  283.     move.l        $04.w,a6    ; Open's dos.library
  284.     moveq        #00,d0
  285.     lea.l        Dosname(pc),a1    ; And gets outputhandle
  286.     jsr        openlib(a6)    ; for the messages...
  287.     move.l        d0,dosbase
  288.     move.l        $04.w,a6
  289.     moveq        #0,d0
  290.     lea         Intname(pc),a1
  291.     jsr         openlib(a6)
  292.     move.l         d0,IntBase    ; buffering the intbase
  293.     rts
  294.  
  295. close_libs:
  296.     move.l        $04.w,a6
  297.     move.l      Dosbase,a1
  298.     jsr         closelib(a6)
  299.     move.l         IntBase,a1    ; close intuition
  300.     jsr         closelib(a6)
  301.     rts
  302.  
  303. open_con:
  304.     move.l        Dosbase,a5
  305.     move.l        #con,d1
  306.     move.l        #mode_old,d2
  307.     jsr        open(a5)
  308.     move.l        d0,handle
  309.     rts
  310.  
  311. close_con:
  312.     move.l        Dosbase,a5
  313.     move.l        handle,d1
  314.     jsr        close(a5)
  315.     rts
  316.  
  317. open_output:
  318.     move.l        Dosbase,a5
  319.     jsr        output(a5)
  320.     move.l        d0,handle
  321.     rts
  322.  
  323. write_con_txt:
  324.     move.l        #con_text,d2
  325.     move.l        #cende-con_text,d3
  326.     bsr.s        writer
  327.     rts
  328.  
  329. read_con:
  330.     move.l        Dosbase,a5
  331.     move.l        handle,d1
  332.     clr.w        input_buffer
  333.     move.l        #input_buffer,d2
  334.     move.l        #2,d3
  335.     jsr        read(a5)
  336.     rts
  337.  
  338. write_con_ins:
  339.     move.l        #con_help,d2
  340.     move.l        #con_help_ende-con_help,d3
  341.     bsr.s        writer
  342.     rts
  343.  
  344. writer:    move.l        Dosbase,a5
  345.     move.l        handle,d1
  346.     jsr        write(a5)
  347.     rts
  348.  
  349. writer1:
  350.     move.l        Dosbase,a5
  351.     move.l        handle,d1
  352.     jsr        write(a5)
  353.     move.l        handle,d1
  354.     move.l        #mes,d2
  355.     move.l        #meslength,d3
  356.     jsr        write(a5)
  357.     rts
  358.  
  359. instructions:
  360.     bsr.L        open_libs
  361.     bsr.L        open_output
  362.     move.l        #mes15,d2    ; Prints out the instructions
  363.     move.l        #mes15length,d3
  364.     bsr.L        writer
  365.     jmp        exit5
  366.  
  367. alert:    move.l        Intbase,a6
  368.     lea        alert1(pc),a0
  369.      moveq        #00,d0        ; Recovery Alert
  370.      move.l         #28,d1
  371.      jsr         dispalert(a6)
  372.     rts
  373.  
  374. killcold_cool:
  375.     move.l        $04.w,a6
  376.     moveq        #0,d3
  377.     move.l        d3,46(a6)    ; cool-capture normal
  378.     move.l        d3,42(a6)    ; cold-capture normal
  379.     move.l        d3,50(a6)
  380.     lea        34(a6),a0    ; New execbase checksum
  381.     clr.w        d0
  382.     moveq        #$17,d1
  383. kcc1:    add.w        (a0)+,d0
  384.     dbf        d1,kcc1
  385.     not.w        d0
  386.     move.w        d0,(a0)
  387.     rts
  388.  
  389. tracker:move.l        $04.w,a6
  390.     lea        350(a6),a0
  391.     lea        Trddevice(pc),a1    ; Searches
  392.     jsr        findname(a6)        ; for trackdisk.device
  393.     move.l        d0,a0
  394.     sub.l        #28,a0            ; that's the most used
  395.     rts                    ; pointer in trd.dev...
  396.  
  397. filler:    move.l        a0,a1            ; fills
  398.     add.l        #$400,a1        ; the virus with zeros
  399.     moveq        #0,d0
  400. fill1:    move.l        d0,(a0)+
  401.     cmpa.l        a0,a1
  402.     bge.s        fill1
  403.     rts
  404.  
  405. clear_kicktag:
  406.     move.l      $04.w,a6
  407.     moveq        #0,d0
  408.     move.l        d0,554(a6)    ; Kickchecksum
  409.     move.l        d0,550(a6)    ; Kicktagptr
  410.     move.l        d0,546(a6)    ; Kickmemptr
  411.     rts
  412.  
  413. ******************* V I R U S  K I L L I N G  P A R T ********************
  414.  
  415. * here begins the part taken from VIRUSX4.0 by STEVE TIBBET
  416.  
  417. ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  418. ;
  419. ;    Check for and Remove the Xeno Virus
  420. ;
  421. ;:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  422.  
  423. xeno:
  424.     move.l    DOSBase,a0        ; Get addr of Open() Vector
  425.     sub.w    #$1c,a0
  426.     move.l    (a0),a0
  427.  
  428.     move.l    a0,d0            ;: If Bit 0 of the Address is set,
  429.     btst    #0,d0            ;: then it's not really an address
  430.     bne.s    NoVirus_xeno        
  431.     
  432.     cmp.l    #$B47C03EE,(a0)
  433.     bne.s    NoVirus_xeno
  434.     cmp.l    #$67000224,4(a0)
  435.     bne.s    NoVirus_xeno
  436.  
  437.     ;:: If we're here, we're fairly sure A0 is pointing to the
  438.     ;:: base of the Xeno virus (well, not it's base, but the address
  439.     ;:: of the first vector it stole, the Open() one.
  440.     ;:: So we'll nuke it.  8-)
  441.  
  442.     move.w    #$6000,$4(a0)
  443.     move.w    #$603E,$240(a0)
  444.     move.w    #$601E,$29C(a0)
  445.  
  446. * END OF PART
  447.  
  448.     move.w        #$1941,virusflag
  449.     move.l        #mes13,d2
  450.     move.l        #mes13length,d3
  451.      bsr.L        writer
  452. NoVirus_xeno:
  453.     rts
  454.  
  455. ; i hate to do this, but until now i never got a xeno virus and was
  456. ; therefore not able to do my own killer.
  457. ; in addition to that: I HATE THE WAY S.TIBBET KILLS VIRUSES!!!!!!!
  458. ; it is not very intelligent to look for a checksum....
  459.  
  460. revenge:
  461.     move.l        $04.w,a6
  462.     cmp.l        #$7e060,46(a6)
  463.     bne.s        revenge_ende
  464.     move.l        $c0,d0
  465.     cmp.l        #$0c794ef9,$c0
  466.     bne.s        revenge_ende
  467.  
  468.     move.l        $7e068,-454(a6)    ; restoring the old pointers
  469.     move.l        $7e06e,148(a6)     ; by grabbing his saved systemcalls
  470.  
  471.     lea        $7e000,a0    ; the virus
  472.     bsr.L        filler
  473.  
  474.     lea        $c0,a0        ; CLEAR
  475.     moveq        #0,d0        ; his routine
  476.     moveq.l        #$10,d6        ; located at $c0
  477. rev1:
  478.     move.l        d0,(a0)+
  479.     dbf        d6,rev1
  480.  
  481.     bsr.L        killcold_cool    ; out of memory!! HE HE..
  482.  
  483.     move.w        #$1941,virusflag
  484.     move.l        #mes12,d2
  485.     move.l        #mes12length,d3
  486.      bsr.L        writer1
  487. revenge_ende:
  488.     rts
  489.  
  490. *************************************************************************
  491. * REVENGE is a stupid one, it copies a small CONTROLLER part down to
  492. * $c0 and is ALWAYS located at $7e000. (No interest in Fast Mem!!) 
  493. * I only added this one, because it was easy and BERSERKER III crashed
  494. * when REVENGE was in memory. (uses cold cap., 148(a6) & -454(a6) DOIO)
  495. *************************************************************************
  496.  
  497. revenge_boot:    ; seems to be a brand new one...
  498.     bsr.L        tracker
  499.     move.l        a0,revenge1
  500.     move.l        (a0),d4
  501.     swap        d4
  502.     cmp.b        #$fe,d4        ; Is this pointer normal? (V1.2)
  503.     beq.L        revenge_boot_ende
  504.     cmp.b        #$ff,d4        ; Is this pointer normal? (V1.3)
  505.     beq.L        revenge_boot_ende
  506.  
  507.     move.l        $4.w,a6        ; using his own check
  508.     moveq        #0,d0        ; routine... 
  509.     move.w        $94(a6),d0
  510.     and.l        #$f0,d0
  511.     cmp.w        #$f0,d0
  512.     beq.L        revenge_boot_ende    ; not in memory
  513.  
  514.     move.l        (a0),a1
  515.     add.l        #$228,a1
  516.     move.l        (a1),revenge_track    ; -28(trackdisk.device)
  517.     add.l        #$4,a1
  518.     move.l        (a1),revenge_rast    ; 148(a6)
  519.     add.l        #$4,a1
  520.     move.l        (a1),revenge_alloc    ; the part he spreads
  521.     sub.l        #$3c4,a1
  522.     move.l        a1,revenge_mem        ; his own start
  523.  
  524.     move.l        revenge1,a0        ; restoring pointers
  525.     move.l        revenge_track,(a0)
  526.  
  527.     move.l        revenge_rast,$94(a6)        
  528.  
  529.     bsr.L        clear_kicktag
  530.  
  531.     move.l        revenge_mem,a0
  532.     bsr.L        filler
  533.  
  534.     move.l        revenge_alloc,a0
  535.     bsr.L        filler
  536.  
  537.     move.l        revenge_alloc,a1    ; he allocatesw memory..
  538.     move.l        #$400,d0        ; ani i give it back...
  539.     jsr        freemem(a6)
  540.  
  541.     move.w        #$1941,virusflag
  542.     move.l        #mes11,d2
  543.     move.l        #mes11length,d3
  544.      bsr.L        writer1
  545. revenge_boot_ende:
  546.     rts
  547.  
  548. *************************************************************************
  549. *
  550. * seems to be a new one -> contains ASCII Text 'REVENGE BOOTLOADER' 
  551. *
  552. *************************************************************************
  553.  
  554. disk_doctor:
  555.     move.l        $04.w,a6    ; Disk-Doc uses cold & cool capture
  556.     move.l        46(a6),d0
  557.     cmp.l        #0,d0        ; No other virus uses both
  558.     beq.L        dd0        ; pointers... [ hope so !!! ]
  559.     move.l        42(a6),d0
  560.     cmp.l        #0,d0
  561.     beq.L        dd0
  562.  
  563.     move.l        42(a6),diskdoc    ; I had to add this very
  564.     move.l        diskdoc,a0    ; complicated routine because
  565.     add.l        #$c4,a0        ; Disk-Doc uses or changes:
  566.     move.l        a0,a1        ; - cool capt.
  567.     addq.l        #4,a1        ; - cold capt.
  568.     move.w        #$4e75,(a1)    ; - DoIO
  569.     jsr        (a0)        ; - 148(a6) [what's that?]
  570.     move.l        a2,diskdoc1    ; - The task of clipboard.device
  571.     addq.l        #6,a2
  572.     move.l        a2,a3        ; This routine gets the adress of
  573.     addq.l        #4,a2        ; its task routine and cuts it off
  574.     move.w        #$4e75,(a2)
  575.     jsr        (a3)
  576.     move.l        a0,diskdoc2
  577.     bsr.L        killcold_cool
  578.     move.l        $04.w,a6
  579.     move.l        #$fc06dc,-$1c6(A6); Only Kick 1.2 values, on 1.3
  580.     move.l        #$fc12fc,148(a6)  ; Disk-Doc shouldn't work...
  581.  
  582.     move.l        diskdoc,a0
  583.     move.l        a0,a1
  584.     add.l        #$1a0,a1
  585.     moveq        #0,d0
  586. dd2:    move.l        d0,(a0)+
  587.     cmpa.l        a0,a1
  588.     bge.s        dd2
  589.     move.l        diskdoc1,a2
  590.     move.w        #$4e75,(a2)
  591.     move.l        diskdoc2,a2
  592.     move.w        #$4e75,(a2)
  593.  
  594.     move.w        #$1941,virusflag
  595.     move.l        #mes6,d2
  596.     move.l        #mes6length,d3
  597.      bsr.L        writer1
  598. dd0:    rts
  599.  
  600. ***********************************************************************
  601. *
  602. *    DISK-DOCTOR
  603. *
  604. *    - After each reset Disk Doctor allocates more memory
  605. *    - This was in my opinion the best one, although it could be
  606. *      better: - it uses DoIO pointer from Kick 1.2 (crash on 1.3)
  607. *          - you can read text in the boot-block
  608. *    - it uses the clipboard task for its dirty work
  609. *    - it uses cold & cool capture to stay in memory
  610. *
  611. *    For such kind of virus Guardian or VirusX are the best killers!!
  612. *    ( Find them in the boot and fight them when they are harmless! )
  613. *    Same with TIMEBOMB, Berserker can't fight this one........
  614. ************************************************************************
  615.  
  616. gadaffi:
  617.     move.l        $04.w,a6    ; Gadaffi uses cool capture
  618.     cmp.l        #0,46(a6)    ; for its dirty work...
  619.     beq.s        gad0        ; no cool capture set
  620.  
  621.     cmp.l        #$47414441,$7fb40; Gadaffi
  622.     bne.s        gad0        ; is ALWAYS to be found at $7fb00
  623.  
  624.     move.l        -$1c6(a6),d5    ; $4b0 with 512 kb
  625.     swap        d5
  626.     cmp.w        #$fc,d5        ; $fc06dc (1.2)  $fc0718 (1.3)
  627.     beq.s        gad0
  628.  
  629.     move.l        46(a6),gadaf
  630.     bsr.L        killcold_cool    ; Clear its cool pointer
  631.     move.l        $04.w,a6
  632.     move.l        #$fc06dc,-$1c6(A6)
  633.  
  634.     bsr.L        clear_kicktag
  635.  
  636.     move.l        gadaf,a0
  637.     sub.l        #$dc,a0
  638.     bsr.L        filler
  639.     move.w        #$1941,virusflag
  640.     move.l        #mes4,d2
  641.     move.l        #mes4length,d3
  642.      bsr.L        writer1
  643. gad0:    rts
  644.  
  645. ********************************************************************
  646. *
  647. *    GADAFFI is a mutant version of Byte Warrior
  648. *
  649. *    - It changes cool capture, kicktag. and DoIO
  650. *    - It is much more stupid than Byte Warrior:
  651. *     -> you can read it in the boot...
  652. *     -> normally it crashes with Kick 1.3 because
  653. *        he uses the DoIO vector of 1.2 itself
  654. *    - After 12 resets it tries to kill your drive, or
  655. *      was it playing a drive music ?? (I don't see any difference!)
  656. *
  657. ********************************************************************
  658.  
  659. bsg:
  660.     move.l        $04.w,a6
  661.     move.l        546(a6),d0    ; BSG 9 is a resident module
  662.     adda.l        550(a6),d0    ; It is still in memory after
  663.     adda.l        554(a6),d0    ; a reset
  664.     cmp.l        #0,d0
  665.     beq.s        bsgende
  666.     move.l        550(a6),a0    ; Searching from A0
  667.     move.l        a0,a1
  668.     add.l        #$1000,a1    ; Searching to A1
  669.     move.l        #$00005454,d0    ; Searching for 'TT'
  670.     moveq        #0,d1
  671. bsg0:
  672.     move.w        (a0)+,d1
  673.     cmp.w        d1,d0
  674.     beq.s        bsg1
  675.     cmpa.l        a0,a1
  676.     bge.s        bsg0
  677.     rts                ; Nothing found !
  678.                     ; It is not always a virus which
  679.                     ; uses these pointers. It could
  680. bsg1:                    ; also be your ramdrive....
  681.     move.w        #$5631,d0
  682.     move.w        (a0),d1
  683.     cmp.w        d1,d0
  684.     bne.s        bsg0
  685.     moveq        #0,d0        ; Kills it from beginning
  686.     move.l        a0,a1        ; to 'TTV1' <- its end marker
  687.     move.l        550(a6),a0
  688. bsg2:
  689.     move.l        d0,(a0)+
  690.     cmpa.l        a0,a1
  691.     bne.s        bsg2
  692.  
  693.     bsr.L        clear_kicktag
  694.  
  695.     move.w        #$1941,virusflag
  696.     move.l        #mes2,d2
  697.     move.l        #mes2length,d3
  698.      bsr.L        writer
  699. bsgende:
  700.     rts
  701.  
  702. ********************************************************************
  703. *
  704. *    BSG 9 is an intelligent version of a link virus
  705. *
  706. *    - It always modifies the FIRST file of the startup-
  707. *      sequence
  708. *    - The file now always is about 2608 bytes long
  709. *    - The old file in in the devs dir with
  710. *      spaces instead of a name now
  711. *    - After the fourth or fifth reset it turns the
  712. *      screen black and prints out its stupid message.
  713. *
  714. *********************************************************************
  715.  
  716. irq:    ; changes oldopen
  717.     move.l        $04.w,a6
  718.     move.l        -$196(a6),d4
  719.     swap        d4
  720.     cmp.b        #$fc,d4    ; V1.2 00fc1430  V1.3 00fc146c
  721.     beq.s        irq5
  722.     move.w        #$1942,virusflag
  723.     move.l        -$196(a6),a4
  724.     add.w        #8,a4
  725.     move.l        #$4e714e71,(a4)    ; Castrate virus
  726.     move.l        $04.w,a5
  727.     sub.l        #$196,a5    ; In this part the old
  728.     move.l        (a5),a4        ; oldopenlib call
  729.     add.l        #18,a4        ; is restored...
  730.     move.l        (a4),(a5)
  731.     move.l        #mes3,d2
  732.     move.l        #mes3length,d3
  733.     bsr.L        writer
  734. irq5:    rts
  735.  
  736. **************************************************************
  737. *
  738. *    The IRQ Team Virus was the first link virus
  739. *    on AMIGA...
  740. *
  741. *    It uses oldopenlibrary for its dirty work.
  742. *    In order to work properly with all Kickstart
  743. *    versions the IRQ-virus saves the replaced
  744. *    sytemcall in memory.
  745. *    To let my Berserker work with all kick versions
  746. *    I just grab his saved sytemcall in order to
  747. *    throw him out properly...
  748. *
  749. **************************************************************
  750.  
  751. exterminator:    ; in trddevice, doio & kicktag... ($4678, $414, $898)
  752.     bsr.L        tracker
  753.     move.l        a0,exter
  754.     move.l        (a0),d4
  755.     swap        d4
  756.     cmp.b        #$fe,d4        ; Is the pointer normal (V1.2)
  757.     beq.L        exe4
  758.     cmp.b        #$ff,d4
  759.     beq.L        exe4        ; Is the pointer normal (V1.3)
  760.  
  761.     move.l        a6,a5
  762.     sub.w        #$262,a5    ; In A5 now Exterminator's address..
  763.     move.l        a5,exter1
  764.     move.l        (a5),d4
  765.     swap        d4
  766.     cmp.b        #$fc,d4        ; Is it the normal system call?
  767.     beq.s        exe4
  768.  
  769.     move.l        exter1,a5
  770.     move.l        (a5),a0
  771.     sub.l        #$14e,a0
  772.     move.l        a0,a1
  773.     add.l        #$400,a1
  774.     moveq        #0,d1
  775.     moveq        #0,d0
  776. exe7:
  777.     move.w        #$4c41,d0    ; We are looking for 'LAMER'
  778.     move.w        (a0)+,d1
  779.     cmp.w        d1,d0
  780.     beq.s        exe2
  781.     cmpa.l        a0,a1
  782.     bge.s        exe7
  783.     rts
  784. exe2:
  785.     move.w        #$4d45,d0
  786.     move.w        (a0),d1
  787.     cmp.w        d1,d0
  788.     bne.s        exe7
  789.     add.l        #28,a0        ; Here exteminator saves his
  790.     move.l        (a0)+,a1    ; changed system calls
  791.     move.l        (a0)+,a2
  792.  
  793.     move.w        #$1941,virusflag
  794.  
  795.     bsr.L        clear_kicktag
  796.  
  797.     move.l        exter1,a0    ; Correct both pointers
  798.     move.l        a1,(a0)
  799.     move.l        exter,a0
  800.     move.l        a2,(a0)
  801.     move.l        exter1,a5    ; Crucify it
  802.     move.l        (a5),a0
  803.     sub.l        #$14e,a0
  804.     bsr.L        filler
  805.     move.l        #mes9,d2
  806.     move.l        #mes9length,d3
  807.     bsr.L        writer1
  808. exe4:    rts
  809.  
  810. ***********************************************************************
  811.  
  812. sca:
  813.     move.l        $04.w,a6
  814.     move.l        46(a6),d2    ; Cold-capture
  815.     cmp.l        #0,d2
  816.     bne.s        sca1
  817.     rts
  818. sca1:
  819.     move.w        #$1941,virusflag
  820.     move.l        46(a6),a0
  821.     move.l        a0,a1
  822.     sub.l        #$3e,a0        ; We are now searching
  823.     add.l        #$400,a1    ; for jsr -456(a6) [DoIO]
  824.     moveq        #0,d1        ; if cold capture is set
  825.     moveq        #0,d0        ; and in the routine is
  826. sca2:                    ; a DoIO it is 100% a
  827.     move.w        #$4eae,d0    ; virus ( mostly mutants)
  828.     move.w        (a0)+,d1
  829.     cmp.w        d1,d0
  830.     beq.s        sca3
  831.     cmpa.l        a0,a1
  832.     bge.s        sca2
  833.     rts                ; Nothing found
  834. sca3:
  835.     move.w        #$fe38,d0
  836.     move.w        (a0),d1
  837.     cmp.w        d1,d0
  838.     bne.s        sca2
  839.     move.l        $7eff0,d2    ; Here is the direct test
  840.     cmp.l         #$53434121,d2    ; if it is SCA or AEK or LSD
  841.     beq.s        sca4        ; if it is none of them it is
  842.                     ; another mutant SCA...
  843.     cmp.l        #$4c534421,d2    ; AEK
  844.     beq.s        scamutants
  845.     cmp.l        #$41454b21,d2    ; LSD
  846.     beq.s        scamutants
  847.     bne.s        scamutants
  848. sca4:
  849.     move.l        #mes5,d2    ; SCA
  850.     move.l        #mes5length,d3
  851.      bsr.L        writer1
  852.     bra.s        scakill
  853. scamutants:
  854.     move.l        #mes8,d2    ; Mutant
  855.     move.l        #mes8length,d3
  856.      bsr.L        writer1
  857. scakill:
  858.     move.l        46(a6),a0
  859.     sub.l        #$3e,a0
  860.     bsr.L        filler
  861.     bsr.L        killcold_cool    ; Repairs both vectors
  862.     rts
  863.  
  864. ************************************************************************
  865.  
  866. dasa:
  867.     move.l        $04.w,a6
  868.     move.l        -$1c6(a6),d5    ; $4b0 with 512 kb
  869.     swap        d5
  870.     cmp.w        #$fc,d5        ; $fc06dc (1.2)  $fc0718 (1.3)
  871.     bne.s        dasa0
  872.     move.l        $7f804,d5    ; Dasa is ALWAYS at $7f800
  873.     cmp.l        #$64116dec,d5    ; no need to restore doio
  874.     beq.s        dasa1        ; pointer (not changed)
  875.     rts
  876. dasa0:
  877.     move.l        #$00fc06dc,-$1c6(a6)    ; Remove its pointer
  878. dasa1:    move.l        -$1c6(a6),a3
  879.     sub.l        #$16e,a3    ; Its beginning
  880.  
  881.     bsr.L        clear_kicktag
  882.  
  883.     move.l        #$4ff,d1    ; Delete virus
  884. dasa2:    move.b        d0,(a3)+
  885.     dbf        d1,dasa2
  886.     move.w        #$1941,virusflag
  887.     move.l        #mes1,d2
  888.     move.l        #mes1length,d3
  889.     bsr.L        writer1
  890.     rts
  891.  
  892. ****************************************************************
  893. *
  894. *    DASA is the Byte Warrior
  895. *
  896. *    DASA is always located at $7f800 and since
  897. *    it uses a direct jump for DoIO of kick V1.2
  898. *    ( jmp $fc06dc ) for his own copy-routines it
  899. *    crashes on kick v1.3.
  900. *    Therefore I have added this two way search, because
  901. *    when it's kick 1.3 DASA can't work but is still in
  902. *    memory and I don't like a virus in memory...
  903. *
  904. *        ONLY A DEAD VIRUS IS A GOOD VIRUS!!!!
  905. *
  906. ***************************************************************
  907.  
  908. bytebandit:            ; Searches for byte bandit
  909.  
  910.     bsr.L        tracker
  911.     move.l        a0,bb1
  912.     cmp.l        #$00f00000,a0
  913.     ble.s        bytebandit1    ; OK! DoIO is changed
  914.     rts
  915.  
  916. bytebandit1:
  917.     move.l        148(a6),a0    ; Now second test if it
  918.     cmp.l        #$00f00000,a0    ; is really byte bandit
  919.     ble.s        bytebandit2    ; LAMER also changes DoIO!
  920.     rts
  921.  
  922. bytebandit2:    ; it is byte bandit!!
  923.     move.l        a0,a4
  924.     add.l        #$10c,a0    ; Here the pointers are
  925.     move.l        (a0)+,a1    ; saved...
  926.     move.l        (a0),a2
  927.     move.l        bb1,a0
  928.     move.l        a1,(a0)        ; Restoring both
  929.     move.l        a2,148(a6)    ; pointers...
  930.  
  931.     bsr.L        clear_kicktag
  932.  
  933.     sub.l        #$2ca,a4    ; Its beginning
  934.     move.l        a4,a0
  935.     bsr.L        filler
  936.  
  937.     move.w        #$1941,virusflag
  938.     move.l        #mes10,d2
  939.     move.l        #mes10length,d3
  940.     bsr.L        writer1
  941.     rts
  942.  
  943. ***************** M E S S A G E S  AND  D A T A S ********************
  944. even
  945. mes:    dc.b $0a,'Virus killed, check your disks....'
  946.     dc.b $0a,$0a             
  947. mesend:
  948. meslength = mesend-mes
  949. even
  950. mes0:    dc.b $0a,$9b,'7;32;41m'
  951.     dc.b $1b,'[1m'
  952.     dc.b '   BERSERKER found ** NO VIRUS ** in memory !!!  '   
  953.     dc.b $1b,'[0m'
  954.     dc.b $9b,'0;31;40m'
  955.     dc.b $0a,$0a
  956. mes0end:
  957. mes0length = mes0end-mes0
  958. even
  959. mes1:    dc.b $0a,' DANGER!! BYTE - WARRIOR (DASA) VIRUS found'
  960. mes1end:
  961. mes1length = mes1end-mes1
  962. even
  963. mes2:    dc.b $0a,' DANGER!!  BSG 9 LINK -  VIRUS killed!!!'                
  964.     dc.b $0a,'Check first prog. in startup seq. or look into devs.'
  965.     dc.b $0a,$0a
  966. mes2end:
  967. mes2length = mes2end-mes2
  968. even
  969. mes3:    dc.b $0a,' DANGER!!  IRQ LINK - VIRUS killed!!!'                
  970.     dc.b $0a,'Check 2nd prog. in startup seq. or cli-command DIR.'
  971.     dc.b $0a,$0a
  972. mes3end:
  973. mes3length = mes3end-mes3
  974. even
  975. mes4:    dc.b $0a,' DANGER!!  GADAFFI - VIRUS found!!!'                
  976. mes4end:
  977. mes4length = mes4end-mes4
  978. even
  979. mes5:    dc.b $0a,' DANGER!!  SCA - VIRUS found!!!'                
  980. mes5end:
  981. mes5length = mes5end-mes5
  982. even
  983. mes6:    dc.b $0a,' DANGER!!  Disk-Doctor VIRUS found!!!'                
  984. mes6end:
  985. mes6length = mes6end-mes6
  986. even
  987. mes7:    dc.b $0a,' '
  988.     dc.b $0a,$0a,$0a
  989.     dc.b $0a,$9b,'7;32;41m'
  990.     dc.b '        ** NO KNOWN VIRUS ** found        '
  991.     dc.b $9b,'0;31;40m'
  992.     dc.b $0a,$0a,$0a,$0a
  993.     dc.b $1b,'[1m'
  994.     dc.b '        PRESS RIGHT MOUSE BUTTON...'
  995.     dc.b $1b,'[0m'
  996. mes7end:
  997. mes7length = mes7end-mes7
  998. even
  999. mes8:    dc.b $0a,' DANGER!!  MUTANT SCA - VIRUS found!!!'                
  1000. mes8end:
  1001. mes8length = mes8end-mes8
  1002. even
  1003. mes9:    dc.b $0a,' DANGER!!  EXTERMINATOR (Lamer!) found!!!'                
  1004. mes9end:
  1005. mes9length = mes9end-mes9
  1006. even
  1007. mes10:    dc.b $0a,' DANGER!!  BYTE - BANDIT VIRUS found!!!'
  1008. mes10end:
  1009. mes10length = mes10end-mes10
  1010. even
  1011. mes11:    dc.b $0a,' DANGER!! REVENGE - BOOTLOADER VIRUS found!'
  1012. mes11end:
  1013. mes11length = mes11end-mes11
  1014. even
  1015. mes12:    dc.b $0a,' DANGER!! REVENGE VIRUS found!'
  1016. mes12end:
  1017. mes12length = mes12end-mes12
  1018. even
  1019. mes13:    dc.b $0a,' DANGER!!  XENO LINK - VIRUS neutralized!!'                
  1020.     dc.b $0a,'Check files on disks and hard-disk with "KV".'
  1021.     dc.b $0a,$0a
  1022. mes13end:
  1023. mes13length = mes13end-mes13
  1024. even
  1025. mes15:
  1026. dc.b $0c,$0a,$1b,'[1m','                      *****  BERSERKER IV.a  *****'
  1027. dc.b $1b,'[0m'
  1028. dc.b    $0a
  1029. dc.b $0a,'       1. This Viruskiller finds and destroys the following:'
  1030. dc.b $0a,'          Byte Bandit,  Byte Warrior (DASA), SCA,  AEK, LSD,'
  1031. dc.b $0a,'          OBELISK, WARHAWK,  PENTAGON, BAMIGA S1, NORTHSTAR,'
  1032. dc.b $0a,'          Exterminator (LAMER) all versions,  GADAFFI Virus,'
  1033. dc.b $0a,'          Disk-Doctor Virus, IRQ-Team 41 Virus (Link Virus),'
  1034. dc.b $0a,'          BSG9 VIRUS (Link Virus), REVENGE BOOTLOADER Virus,'
  1035. dc.b $0a,'          REVENGE Virus & XENO Link Virus.'
  1036. dc.b $0a,'       2. All bootblock  viruses  will be deleted from memory'
  1037. dc.b $0a,'          and all  changed  system pointers will be restored.'
  1038. dc.b $0a,'       3. The  Link Viruses  are only  killed in memory. They'
  1039. dc.b $0a,'          might have infected some prgs. on disk!! Take care!'
  1040. dc.b $0a,'       4. Berserker always corrects cold- and coolcapture....'
  1041. dc.b $0a,'          Berserker works with more memory & all  kickstarts.'
  1042. dc.b $0a,'       5. Hi to  Thorsten, Olaf, Gunnar, Henning and Michael.'
  1043. dc.b $0a,'       6. You  can  also  execute  Berserker  from Workbench.'
  1044. dc.b    $0a
  1045. dc.b $1b,'[1m'
  1046. dc.b $0a,'                                    This program is in the PUBLIC DOMAIN!!!'
  1047. dc.b $1b,'[3m'
  1048. dc.b    $0a
  1049. dc.b $0a,'                               ©Copyright 1988, 1989, 1990 by Ralf Thanner.'
  1050. dc.b $1b,'[0m'
  1051. dc.b $0a
  1052. mes15end:
  1053. mes15length = mes15end-mes15
  1054. even
  1055.  con:
  1056. dc.b'CON:20/11/360/150/            BERSERKER IV.a            ',0
  1057. even
  1058.  con_text:
  1059.     dc.b ' '
  1060.     dc.b $0a,$9b,'7;32;41m'
  1061.     dc.b ' BERSERKER IV  (C) 1990 by RALF THANNER   '   
  1062.     dc.b $9b,'0;31;40m'
  1063.     dc.b $0a,$0a,$0a
  1064.     dc.b '  PLEASE ENTER EITHER:',$0a
  1065.     dc.b '  --------------------'
  1066.     dc.b $0a,$0a
  1067.     dc.b '    "C" or "c" for checking memory.'
  1068.     dc.b $0a,$0a
  1069.     dc.b '    "?" for short instructions.'
  1070.     dc.b $0a,$0a
  1071.     dc.b '    "Q" or "q" for leaving BERSERKER.'
  1072.     dc.b $0a,$0a,$0a
  1073.     dc.b $1b,'[1m'
  1074.     dc.b '  ENTER YOUR CHOICE: '
  1075.     dc.b $1b,'[0m'
  1076.  cende:
  1077. even
  1078.  con_help:
  1079.      dc.b ' '
  1080.     dc.b $0a,'  BERSERKER IV finds the following:'
  1081.     dc.b $0a,'  ---------------------------------'
  1082.     dc.b $0a,'  Byte Bandit,  Byte Warrior,  SCA,  AEK,'
  1083.     dc.b $0a,'  LSD,  OBELISK,  PENTAGON, BS1, WARHAWK,'
  1084.     dc.b $0a,'  NORTHSTAR,  Exterminator  Virus (LAMER),'
  1085.     dc.b $0a,'  GADAFFI,  Disk - Doctor,  IRQ-, Xeno- &'
  1086.     dc.b $0a,'  BSG-9  Link Viruses, REVENGE Virus  and' 
  1087.     dc.b $0a,'  REVENGE BOOTLOADER Virus.'
  1088.     dc.b $0a
  1089.     dc.b $0a,'  All  bootblock  viruses  will be killed'
  1090.     dc.b $0a,'  in memory  and all system pointers will'
  1091.     dc.b $0a,'  be restored. The Link Viruses will ONLY'
  1092.     dc.b $0a,'  be deleted in  memory. They might  have'
  1093.     dc.b $0a,'  infected some prgs on disk....'
  1094.     dc.b $0a,$0a
  1095.     dc.b $1b,'[1m'
  1096.     dc.b '  PRESS RIGHT MOUSE BUTTON'
  1097.     dc.b $1b,'[0m'
  1098.  con_help_ende:
  1099. even
  1100.  revenge1:    dc.l 0
  1101.  revenge_alloc:    dc.l 0
  1102.  revenge_track:    dc.l 0
  1103.  revenge_rast:    dc.l 0
  1104.  revenge_mem:    dc.l 0
  1105.  diskdoc:    dc.l 0
  1106.  diskdoc1:    dc.l 0
  1107.  diskdoc2:    dc.l 0
  1108.  gadaf:        dc.l 0
  1109.  bb1:        dc.l 0
  1110.  exter:        dc.l 0
  1111.  exter1:    dc.l 0
  1112.  dosbase:     dc.l 0 
  1113.  IntBase:    dc.l 0
  1114.  handle:    dc.l 0
  1115.  message:    dc.l 0
  1116.  virusflag:    dc.w 0
  1117.  input_buffer:    blk.b 2,0
  1118. even
  1119.  trddevice:    dc.b    'trackdisk.device',0
  1120. even
  1121.  IntName:     dc.b    'intuition.library',0
  1122. even
  1123.  dosname:    dc.b    'dos.library',0
  1124. even
  1125. alert1:    dc.w     178
  1126.     dc.b     16
  1127.     dc.b     'Berserker found VIRUS in memory!'
  1128. even
  1129.